package org.dromara.app.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.app.domain.AppMessage;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * App端消息推送视图对象 app_message
 *
 * @author ruoyi
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = AppMessage.class)
public class AppMessageVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 消息ID
     */
    @ExcelProperty(value = "消息ID")
    private Long messageId;

    /**
     * 消息标题
     */
    @ExcelProperty(value = "消息标题")
    private String title;

    /**
     * 消息内容
     */
    @ExcelProperty(value = "消息内容")
    private String content;

    /**
     * 消息类型（system:系统消息 notice:通知 activity:活动）
     */
    @ExcelProperty(value = "消息类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "app_message_type")
    private String messageType;

    /**
     * 推送目标（all:全部用户 user:指定用户 role:指定角色）
     */
    @ExcelProperty(value = "推送目标", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "app_target_type")
    private String targetType;

    /**
     * 目标ID列表（用户ID或角色ID，逗号分隔）
     */
    @ExcelProperty(value = "目标ID列表")
    private String targetIds;

    /**
     * 发送时间
     */
    @ExcelProperty(value = "发送时间")
    private LocalDateTime sendTime;

    /**
     * 状态（0待发送 1已发送 2发送失败）
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "app_message_status")
    private String status;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

}